package breeze.pixel.weather.adapter;

import breeze.pixel.weather.adapter.weather.AirNowAdapter;
import breeze.pixel.weather.adapter.weather.CityAdapter;
import breeze.pixel.weather.adapter.weather.DailyWeatherAdapter;
import breeze.pixel.weather.adapter.weather.HourlyAdapter;
import breeze.pixel.weather.adapter.weather.IndicesAdapter;
import breeze.pixel.weather.adapter.weather.MoonAdapter;
import breeze.pixel.weather.adapter.weather.WeatherNowAdapter;
import breeze.pixel.weather.adapter.weather.WarnAdapter;

public interface IAppWeatherHelper {


    /**
     * 当前小天气涉及的数据：
     * 1. 当前天气
     * 2. 空气质量
     * 3. 逐小时天气
     * 4. 生活指数
     * 5. 月相
     * 6. 未来天气预报
     * 7. 灾害预警
     * 8. 城市信息
     */


    interface NowWeatherResponse {
        void success(WeatherNowAdapter data);
        void fail(String err);
    }
    /**
     * 获取当前天气
     * @param cityID
     * @return
     */
    void getWeatherNow(String cityID, NowWeatherResponse response);



    interface AirQualityResponse {
        void success(AirNowAdapter data);
        void fail(String err);
    }
    /**
     * 获取空气质量
     * @param cityID
     * @return
     */
    void getAirQuality(String cityID, AirQualityResponse response);



    interface WeatherWarnResponse {
        void success(WarnAdapter data);
        void fail(String err);
    }
    /**
     * 获取天气警告
     * @param cityID
     * @return
     */
    void getWeatherWarn(String cityID, WeatherWarnResponse response);



    interface HourlyWeatherResponse {
        void success(HourlyAdapter data);
        void fail(String err);
    }

    /**
     * 获取逐小时天气
     * @param cityID
     * @return
     */
    void getHourlyWeather(String cityID, HourlyWeatherResponse response);



    interface IndicesResponse {
        void success(IndicesAdapter data);
        void fail(String err);
    }
    /**
     * 获取生活指数
     * @param cityID
     * @return
     */
    void getIndices(String cityID, IndicesResponse response);


    interface MoonInfoResponse {
        void success(MoonAdapter data);
        void fail(String err);
    }

    /**
     * 获取月相信息
     * @param cityID
     * @return
     */
    void getMoonInfo(String cityID, MoonInfoResponse response);


    interface DailyWeatherResponse {
        void success(DailyWeatherAdapter data);
        void fail(String err);
    }
    /**
     * 获取多日天气
     * @param cityID
     * @param days
     * @return
     */
    void getDailyWeather(String cityID, int days, DailyWeatherResponse response);

    interface CityQueryResponse {
        void success(CityAdapter data);
        void fail(String err);
    }

    /**
     * 获取城市信息
     * @param name
     * @param response
     */
    void getCityInfo(String name, CityQueryResponse response);

}
